<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    		     <!-- Modal1 -->
					<div class="modal fade" id="myModal4" tabindex="-1" role="dialog" >

							<div class="modal-dialog">
							<!-- Modal content-->
								<div class="modal-content">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal">&times;</button>
										<h4>用户登录</h4>
										<div class="login-form">
											<form name="login" method="post">
												<input type="text" name="name" placeholder="用户名" required="">
												<input type="password" name="password" placeholder="密码" required="">
												
												</form>
												<div class="tp">
												<input type="submit" onclick="dianji()" value="登录" />
													
												</div>
												<div class="forgot-grid">
												       <div class="log-check">
														<label class="checkbox"><input type="checkbox" name="checkbox">记住密码</label>
														</div>
														<div class="forgot">
															<a href="#" data-toggle="modal" data-target="#myModal2">忘记密码?</a>
														</div>
														<div class="clearfix"></div>
													</div>
												
											
											<script type="text/javascript">
											function dianji(){
												
											
											var name=login.name.value;
											var password=login.password.value;
											$.post("/movie/login",{name:name,password:password},
													function(result){
														
														if(result.login=="yes"){
															$('#myModal4').modal('hide');
															window.location.reload();
														}
														else{
															alert("用户登录失败！");
														}
													});
											}
											</script>
										</div>
									</div>
								</div>
							</div>
						</div>
				<!-- //Modal1 -->
				  <!-- Modal1 -->
					<div class="modal fade" id="myModal5" tabindex="-1" role="dialog" >

							<div class="modal-dialog">
							<!-- Modal content-->
								<div class="modal-content">
									<div class="modal-header">
										<button type="button" class="close" data-dismiss="modal">&times;</button>
										<h4>用户注册</h4>
										<div class="login-form">
											<form name="reg" method="post">
											    <input type="text" name="name" placeholder="用户名" required="">
												
												<input type="password" name="password" placeholder="密码" required="">
												<input type="password" name="conform password" placeholder="确认密码 " required="">
												<div class="signin-rit">
													<span class="agree-checkbox">
														<label class="checkbox"><input type="checkbox" name="checkbox">我同意 <a class="w3layouts-t" href="#" target="_blank">电影售票系统协议</a></label>
													</span>
												</div>
												
											</form>
											<div class="tp">
													<input type="submit" onclick="zhuce()" value="注册用户">
												</div>
										</div>
									</div>
								</div>
							</div>
						</div>
						<script type="text/javascript">
											function zhuce(){
												
											
											var name=reg.name.value;
											var password=reg.password.value;
											$.post("/movie/reg",{name:name,password:password},
													function(result){
														
														if(result.login=="yes"){
															$('#myModal4').modal('hide');
															alert("用户注册成功！");
															window.location.reload();
														}
														else{
															alert("用户注册失败！");
														}
													});
											}
											</script>
				<!-- //Modal1 -->

